<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Insert title here</title>

<!-- <link rel="stylesheet" href="/layui/css/layui.css"  media="all"> 这样写也是可以的 -->
<link rel="stylesheet" th:href="@{/layui/css/layui.css}"  media="all">
<script th:src="@{/layui/layui.js}" charset="utf-8"></script>

</head>
<body>
	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
	  <legend>学生信息</legend>
	</fieldset>   
	 
	<div style="padding: 20px; background-color: #F2F2F2;">
	  <div class="layui-row layui-col-space15">
	    <div class="layui-col-md6">
	      <div class="layui-card">
	        <div class="layui-card-header">卡片面板</div>
	        <div class="layui-card-body">
				<div>
					<span>学生编号：</span><span th:text="${stu.id}"></span>
				</div>	
				<div>	
					<span>学生姓名：</span><span th:text="${stu.name}"></span>
				</div>	
				<div>	
					<span>学生性别：</span><span th:text="${stu.sex}"></span>
				</div>	
				<div>	
					<span>学生住址：</span><span th:text="${stu.address}"></span>
				</div>	
				<div>	
					<span>学生生日：</span><span th:text="${#dates.format(stu.birth,'yyyy-MM-dd HH:mm:ss')}"></span>
				</div>	
				<div>
					<span>学生余额：</span><span th:text="${#numbers.formatDecimal(stu.money,4,2)}"></span>
				</div>
	        </div>
	      </div>
	    </div>
	  </div>
	</div> 
</body>

<a href="/login?name=admin&password=123">登录</a><!--   原始的登录传参方式 -->
<a th:href="@{/login?name=aaa&password=121233}">登录</a>
<a th:href="@{/login(name=bbb,password=222222)}">登录</a>

<!-- 在js里获取Model传来的数据 -->
<script type="text/javascript">
	var id=[[${stu.id}]];   //在js中获取Model中的数据
	var name='[[${stu.name}]]';//''  "" 都可以  获取字符串类型数据
	alert(id);
	alert(name);
</script>


</html>